package com.spring04.run;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.spring04.dao.DepartmentDao;
import com.spring04.vo.Department;

public class Run {

	public static void main(String[] args) {
		ApplicationContext ctx=new ClassPathXmlApplicationContext("/application.xml");
		DepartmentDao departmentDAO=(DepartmentDao) ctx.getBean("departmentDAO");
		for (Department department :departmentDAO.findAll()) {
			System.out.println(department);
		}
	}

}
